# -*- coding: utf-8 -*-
# @Time:2021/08/03 23:43
# @Author:Cindy
from server import db


class TestCase(db.Model):
    # __tablename__ = "client"
    id = db.Column(db.Integer, primary_key=True)
    nodeid = db.Column(db.String(80), nullable=False)
    remark = db.Column(db.String(120))

    def as_dict(self):
        """
        返回一个标准的python结构体
        :return:
        """
        return {
            'id': self.id,
            'nodeid': self.nodeid,
            'remark': self.remark
        }


if __name__ == '__main__':
    db.drop_all()
    db.create_all()
